#!/usr/bin/env bash

## configure and install minimal openbox desktop environment

## check for sudo/root
#if ! [ $(id -u) = 0 ]; then
#  echo "This script must run with sudo, try again..."
#  exit 1
#fi

cat ./xsessionrc >> /home/$SUDO_USER/.xsessionrc
chown $SUDO_USER:$SUDO_USER /home/$SUDO_USER/.xsessionrc

apt update

    apt install --no-install-recommends \
    xorg \
    mesa-vulkan-drivers \
    vulkan-icd \
    xserver-xorg-video-intel \
    xfonts-cyrillic \
    mesa-utils 
    
apt-get update
apt-get upgrade
apt-get install openbox
mkdir -p .config/openbox
cp /etc/xdg/openbox/* ~/.config/openbox/
ls -a .config/openbox/
cp /etc/skel/ .xinitrc ~/.xinitrc
ls -a

apt-get install \

  lxappearance \
  lxappearance-obconf \
  obconf \
  openbox-menu \
  obmenu \
  arandr \
  xinput \
  compton \
  nitrogen \
  viewnior \
  dunst \
  elinks \
  volti \
  xxkb \
  slim \
  feh \
  mousepad \
  xinit \
  adwaita-qt \
  qt5ct \
  ntfs-3g \
  screenfetch \
  plymouth-label 

apt-get install --no-install-recommends \
    thunar-archive-plugin \
    thunar-volman \
    xfce4-xkb-plugin \
    gtk2-engines \
    mousepad \
    gnome-mpv \
	qmmp \
	xfonts-terminus \
	mat2 \
	screenfetch \
	rxvt-unicode \
	zathura \
	flameshot \
	plank \
	gnome-mpv \
	fbreader \
	sakura \
	rofi \
	ffmpeg \
	file-roller \
	unzip \
	zip \
	arj \
	lzip \
	lzop \
	ncompress \
	rzip \
	squashfs-tools \
	unace \
	unalz \
	unar \
	lrzip \
	p7zip \
	p7zip-full \
	gufw \
	network-manager 
echo 
echo openbox install complete, please reboot and issue 'startx'
echo


